<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 <%@ page  import="util.*,cn.news.dao.*,cn.news.entity.*" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script type="text/javascript">
	function check(){
		var tname = document.getElementById("tname");

		if(tname.value == ""){
			alert("请输入主题名称！！");
			tname.focus();
			return false;
		}		
		return true;
	}
</script>
<%
	String tname = request.getParameter("tname");
	
%>
<div id="main">

  <div id="opt_area">
    <h1 id="opt_type"> 修改主题： </h1>
    <form action="topicUpdate" method="post" onsubmit="return check()">
      <p>
        <label> 主题名称 </label>
 
      <p>
 	<c:forEach var="c" items="${cates}">
 	<c:if test="${c.tid==tid}">
 	<input type="text" name="tname" value="${c.tname}" />
	<input type="hidden" name="tid" value="${c.tid}"readonly="readonly"/>
 	</c:if>
 	</c:forEach>
	 </p>
      </p>
    
      <input type="submit" value="提交" class="opt_sub" />
      <input type="reset" value="重置" class="opt_sub" />
    </form>
  </div>
</div>

